﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;
namespace UIControls
{
    public class CsButton :Button,IUIControl    
    {
        public CsButton()
        {
            this.UseVisualStyleBackColor = false;
            base.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
            this.BackColor = GlobalUIVar.gBackColor;
            this.FlatAppearance.BorderColor = GlobalUIVar.gBackColor;
            this.FlatAppearance.BorderSize = 0;
            this.FlatAppearance.MouseOverBackColor = GlobalUIVar.gSelectedColor;
            this.FlatAppearance.MouseDownBackColor = GlobalUIVar.gPressDownColor;
            this.Font = GlobalUIVar.gButtonFont;
            this.BackColor = GlobalUIVar.gBackColor;
        }
        public bool UseVisualStyleBackColor
        {
            get { return false; }
            set { base.UseVisualStyleBackColor = false; }
        }
        protected override void OnMouseEnter(EventArgs e)
        {
            base.OnMouseEnter(e);
            
            this.BackColor = GlobalUIVar.gSelectedColor;

        }
        protected override void OnMouseLeave(EventArgs e)
        {
            base.OnMouseLeave(e);
            
            this.BackColor = GlobalUIVar.gBackColor;
        }
        public string LabelText
        {
            get { return this.Text; }
        }
    }
  
}
